package com.example.mardan_demo1.service;


import com.example.mardan_demo1.pojo.QiYeYongHu.QiYeYongHu;
import com.example.mardan_demo1.pojo.Result;
import com.example.mardan_demo1.pojo.User;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;


public interface UserService {

//    寻找用户
    User findUserByUserName(String username);
//    注册用户
    void register(String username, String password, String name, String email, String userAvatar);
//     更新用户信息
    void update(User user);
//更新头像
    void updateAvatar(String avatarURL);
//    修改用户密码
    void updatePwd(String newPassWord);

    Result getUserInfo();

    // 获取用户详细信息
    Result getUserDetail();

    //修改用户详细信息
    Result updateDetail(User user);

    Result<String> login(String userName, String userPwd);

    Result updatePassWd(String oldPassWord, String newPassWord, String rePassWord);

    Result getUserList(String name, String userName, Integer pageSize, Integer pageNum);

    Result addUser(User user);

    Result buMenXinZeng(String mingCheng, Integer xuHao);

    Result yongHuSheZhiZhiWu( Integer userId, Integer bumenId, String role);

    Result buMenLieBiao();

    Result addUser(String name, String username, String password,  Integer buMenId, String role);

    Result adminGetUserById(Integer userId);

    Result adminUpdateUserInfo(Integer userId, String name, String password, Integer buMenId, String role);

    Result userUpdateDetail(User user);

    Result qiYeZhuCe(QiYeYongHu yongHu);

    Result qiYeYongHuGetUserInfo();
}
